Participants

Final sample size includes 182 participants (Women: 115, Men: 65, Other: 2). 44 (24%) participants were of a Hispanic, Latino, or Spanish origin. The average age of the sample was 20 years (SD: 2, Range: 18 to 32).

  Freq %
American Indian/Alaskan 2 1.10
Asian 14 7.69
Black/AA 2 1.10
Multiracial 9 4.95
White 155 85.16
Total 182 100.00

GAVs

Results

Manipulation Check

A 2-Event x 3-Task repeated measures ANOVA was used to verify that the tasks successfully elicited ERNs.

Effect DFn DFd F p p<.05 pes
2 Task 2 362 10.38 4.96e-05
0.0543
3 Event 1 181 413.14 1.36e-48
0.6954
4 Task x Event 2 362 2.51 8.33e-02 0.0137

pes = partial eta-squared, and Greenhouse Geisser correction was applied for the effects involving task.

There are main effects of event and task. Error trials show larger amplitude than correct trials.

  • Flanker: t(181) = 14.88, p < .001
  • Stroop: t(181) = 16.32, p < .001
  • Go/NoGo: t(181) = 14.9, p < .001

For the overall main effect of task, flanker trials showed smaller overall amplitude than either Stroop,t(181) = 2.54, p = 0.01, or go/nogo tasks,t(181) = 4.14, p < .001. There were no differences in overall amplitude between Stroop and go/nogo tasks,t(181) = 1.57, p = 0.12.

Manipulation check was successfully passed!

Psychometric Internal Consistency/Data Quality

Group-Level Reliability Subject-Level Reliability SME
Mean 95% CrI Range RMS
Flanker ERN Correct .97 (.96, .98) .95 to .998 0.53
Error .86 (.83, .89) .65 to .99 1.33
Difference .79 (.73, .83)
Pe Correct .93 (.92, .95) .88 to .998 0.5
Error .89 (.87, .91) .66 to .99 1.29
Difference .90 (.87, .92)
N2 Congruent .96 (.95, .96) .35 to .99 0.77
Incongruent .94 (.93, .96) .46 to .99 0.82
Difference .42 (.29, .53)
N1 Congruent .91 (.89, .93) .25 to .98 0.68
Incongruent .88 (.86, .91) .24 to .97 0.78
Difference .09 (.02, .21)
Stroop ERN Correct .97 (.97, .98) .94 to .998 0.51
Error .77 (.71, .81) .68 to .99 1.61
Difference .75 (.69, .80)
Pe Correct .93 (.92, .95) .89 to .997 0.49
Error .86 (.83, .89) .49 to .99 1.61
Difference .82 (.77, .85)
N2 Congruent .92 (.91, .94) .65 to .99 0.84
Incongruent .91 (.89, .93) .53 to .99 0.88
Neutral .92 (.90, .93) .64 to .99 0.86
Difference .27 (.12, .40)
N1 Congruent .84 (.80, .87) .36 to .98 0.79
Incongruent .82 (.78, .86) .41 to .98 0.81
Neutral .81 (.77, .85) .25 to .97 0.81
Difference .11 (.02, .24)
Go/NoGo ERN Correct .97 (.96, .97) .93 to .999 0.52
Error .78 (.73, .83) .62 to .99 1.84
Difference .70 (.64, .77)
Pe Correct .90 (.88, .92) .87 to .995 0.51
Error .86 (.83, .89) .75 to .996 1.81
Difference .83 (.80, .87)
N2 Go .96 (.95, .97) .83 to .99 0.48
NoGo .85 (.82, .88) .50 to .98 2.38
Difference .72 (.66, .78)
N1 Go .91 (.89, .93) .71 to .98 0.47
NoGo .58 (.49, .67) .26 to .94 1.28
Difference .09 (.02, .20)

Note: difference activity for N1 and N2 during Stroop is the incongruent minus congruent activity.

Aim 1a (Direct Replication)

Error-Trial MTMM Matrix

Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN .68
Pe .04 .74
N2 .60** .12 .88
N1 .13 -.11 .30** .76
Stroop ERN .45** -.08 .33** -.10 .52
Pe .04 .41** .05 -.05 -.05 .65
N2 .44** -.11 .64** .28** .49** -.11 .80
N1 .11 -.16* .15* .62** -.02 -.17* .29** .64
Go/NoGo ERN .53** .03 .46** .05 .45** .01 .46** .14 .53
Pe .11 .67** .10 -.15* .00 .53** -.11 -.19** .09 .72
N2 .45** .00 .52** .08 .27** .03 .50** .17* .60** .06 .74
N1 .12 -.01 .16* .49** .00 -.10 .24** .51** .10 -.09 .32** .40
Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN (.59, .75)
Pe (-.10, .19) (.67, .80)
N2 (.49, .68) (-.03, .26) (.84, .91)
N1 (-.01, .27) (-.25, .04) (.16, .43) (.69, .81)
Stroop ERN (.32, .56) (-.22, .07) (.19, .45) (-.24, .05) (.40, .62)
Pe (-.10, .19) (.28, .52) (-.10, .19) (-.19, .10) (-.19, .10) (.56, .73)
N2 (.31, .55) (-.25, .04) (.55, .72) (.14, .41) (.37, .59) (-.25, .04) (.74, .85)
N1 (-.04, .25) (-.29, -.01) (.00, .29) (.53, .71) (-.16, .13) (-.31, -.02) (.15, .42) (.55, .72)
Go/NoGo ERN (.42, .63) (-.12, .17) (.34, .57) (-.10, .19) (.32, .55) (-.13, .16) (.34, .57) (-.01, .28) (.42, .63)
Pe (-.04, .25) (.58, .74) (-.05, .24) (-.29, -.01) (-.14, .15) (.41, .62) (-.25, .04) (-.33, -.05) (-.06, .23) (.64, .78)
N2 (.33, .56) (-.14, .15) (.40, .62) (-.06, .23) (.13, .40) (-.11, .18) (.38, .60) (.02, .30) (.50, .68) (-.09, .20) (.67, .80)
N1 (-.03, .26) (-.15, .14) (.01, .30) (.37, .59) (-.14, .15) (-.24, .05) (.10, .37) (.39, .61) (-.04, .24) (-.23, .06) (.18, .44) (.27, .52)

Riesel et al. Paper Findings

Flanker Stroop Go/NoGo
ERN Pe ERN Pe ERN Pe
Flanker ERN (0.67, 0.89)
Pe (0.08, 0.60) (0.77, 0.93)
Stroop ERN (0.08, 0.60) (-0.02, 0.54) (0.49, 0.82)
Pe (-0.33, 0.27) (0.13, 0.63) (0.10, 0.62) (0.34, 0.75)
Go/NoGo ERN (0.15, 0.65) (-0.21, 0.39) (0.03, 0.57) (-0.20, 0.40) (0.37, 0.76)
Pe (-0.19, 0.41) (0.22, 0.69) (-0.21, 0.39) (0.08, 0.60) (0.34, 0.75) (0.55, 0.85)

Difference-Score MTMM Matrix

Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN .56
Pe -.18* .75
N2 .06 -.06 .28
N1 .06 .01 .38** -.13
Stroop ERN .37** -.16* .13 -.10 .51
Pe -.02 .45** -.08 .00 -.15* .62
N2 -.05 -.05 .00 .10 .00 .04 .12
N1 .11 -.06 -.02 .05 -.07 .05 .42** -.06
Go/NoGo ERN .36** -.20** .05 -.02 .34** -.06 .03 .00 .43
Pe -.08 .66** -.09 -.08 -.10 .56** -.10 -.02 -.20** .68
N2 .18* -.07 .12 .02 .13 .01 .01 .00 .42** -.05 .57
N1 -.15* .10 .07 -.04 .00 -.16* .05 .00 -.06 -.06 .22** -.11
Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN
Pe (-.32, -.03)
N2 (-.08, .21) (-.21, .08)
N1 (-.08, .21) (-.13, .16) (.24, .50)
Stroop ERN (.24, .49) (-.30, -.02) (-.02, .27) (-.24, .05)
Pe (-.17, .12) (.32, .56) (-.23, .06) (-.15, .14) (-.29, -.00)
N2 (-.19, .10) (-.20, .09) (-.15, .14) (-.04, .24) (-.15, .14) (-.10, .19)
N1 (-.04, .25) (-.20, .09) (-.17, .12) (-.10, .19) (-.21, .08) (-.10, .19) (.29, .53)
Go/NoGo ERN (.22, .48) (-.34, -.06) (-.09, .20) (-.17, .12) (.21, .47) (-.20, .09) (-.11, .18) (-.15, .14)
Pe (-.23, .06) (.57, .74) (-.24, .05) (-.22, .07) (-.24, .05) (.45, .65) (-.24, .04) (-.16, .13) (-.33, -.05)
N2 (.03, .32) (-.21, .08) (-.02, .26) (-.13, .16) (-.01, .27) (-.14, .15) (-.14, .15) (-.14, .15) (.29, .53) (-.19, .10)
N1 (-.29, -.00) (-.05, .24) (-.08, .21) (-.18, .11) (-.14, .15) (-.29, -.01) (-.10, .19) (-.14, .15) (-.21, .08) (-.20, .09) (.07, .35)

Riesel et al. Paper Findings

Flanker Stroop Go/NoGo
ERN Pe ERN Pe ERN Pe
Flanker ERN (0.60, 0.86)
Pe (-0.36, 0.24) (0.69, 0.90)
Stroop ERN (0.43, 0.80) (-0.38, 0.22) (0.49, 0.82)
Pe (-0.37, 0.23) (0.04, 0.58) (-0.13, 0.46) (0.27, 0.72)
Go/NoGo ERN (0.43, 0.80) (-0.52, 0.04) (0.45, 0.80) (-0.35, 0.25) (0.42, 0.79)
Pe (-0.36, 0.24) (0.08, 0.60) (-0.43, 0.16) (-0.00, 0.55) (-0.15, 0.44) (0.31, 0.74)

Aim 1b (Conceptual Replication)

Here is the brms code for analyzing the data.

library(brms)
library(cmdstanr)

load("~/rrr_ern_alldata.RData")
set_cmdstan_path("~/cmdstanr_cmdstan/cmdstan-2.29.2")
save_path <- "~/rrr_ern_brms"

n_chains <- 4
n_cores <- 4
n_iter <- 2000
n_warmup <- 8000
n_seed <- 042823
n_threads <- 6

pr_ls <- c(
  set_prior("normal(0,3)", class = "b"),
  set_prior("lkj(2)", class = "L"),
  set_prior("student_t(10, 0, 3)", class = "sd")
)

erp_onlysngtrl$site <- ifelse(erp_onlysngtrl$subjid < 2000, "usf", "byu")

brm_fit <- brm(bf(erp ~ -1 + as.factor(cell) + site + (-1 + as.factor(cell)|subjid),
               sigma ~ -1 + as.factor(cell) + site + (-1 + as.factor(cell)|subjid)),
               data = erp_onlysngtrl,
               family = gaussian(),
               prior = pr_ls,
               chains = n_chains,
               cores = n_cores,
               iter = n_iter + n_warmup,
               warmup = n_warmup,
               seed = n_seed,
               sample_prior = "yes",
               backend = "cmdstanr",
               threads = threading(n_threads),
               file = file.path(save_path,"rrr_ern_mtmm_brmls"))

summary(brm_fit)

Error-Trial MTMM Matrix

Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN
Pe .02
N2 .65 .12
N1 .13 -.12 .28
Stroop ERN .51 -.13 .37 -.11
Pe .04 .46 .08 -.02 -.14
N2 .42 -.13 .64 .27 .55 -.11
N1 .09 -.15 .12 .69 -.02 -.18 .28
Go/NoGo ERN .57 .02 .44 .53 .02 .45 .1
Pe .14 .74 .14 -.14 -.03 .57 -.12 -.18 .09
N2 .43 -.02 .51 .06 .24 .04 .49 .13 .67 .05
N1 .1 -.02 .17 .6 .01 -.11 .28 .64 .1 -.14 .4
Flanker
Stroop
Go/NoGo
ERN Pe N2 N1 ERN Pe N2 N1 ERN Pe N2 N1
Flanker ERN
Pe (-.14, .18)
N2 (.54, .75) (-.03, .26)
N1 (-.03, .28) (-.27, .03) (.13, .41)
Stroop ERN (.35, .64) (-.30, .05) (.21, .51) (-.28, .06)
Pe (-.13, .19) (.30, .59) (-.07, .23) (-.17, .15) (-.31, .04)
N2 (.28, .55) (-.27, .03) (.54, .73) (.12, .41) (.41, .67) (-.27, .04)
N1 (-.07, .25) (-.31, .01) (-.03, .27) (.58, .79) (-.20, .15) (-.34, -.02) (.14, .43)
Go/NoGo ERN (.42, .69) (-.15, .19) (.30, .57) (-.17, .16) (.36, .67) (-.15, .19) (.30, .58) (-.08, .27)
Pe (-.02, .30) (.63, .82) (-.01, .28) (-.30, .02) (-.21, .14) (.43, .69) (-.27, .03) (-.34, -.02) (-.08, .25)
N2 (.28, .56) (-.17, .14) (.39, .62) (-.10, .21) (.07, .40) (-.12, .20) (.37, .61) (-.02, .28) (.54, .78) (-.10, .21)
N1 (-.10, .29) (-.21, .17) (-.01, .34) (.43, .74) (-.20, .22) (-.30, .08) (.10, .46) (.48, .78) (-.10, .30) (-.32, .05) (.22, .57)

Determination of Replication

  1. Monocomponent-heterotask correlations (convergent validity) should be greater than the heterocomponent-monotask correlations (divergent validity).
Simple Correlation Flanker: ERN vs. Pe Stroop: ERN vs. Pe Go/NoGo: ERN vs. Pe
Effect 95% Credible Interval 95% Credible Interval 95% Credible Interval 95% Credible Interval
ERN Flanker vs. ERN Stroop (.35, .64) (0.26, 0.71) (0.42, 0.86) (0.19, 0.63)
ERN Flanker vs. ERN Go/NoGo (.42, .69) (0.34, 0.75) (0.48, 0.92) (0.27, 0.68)
ERN Stroop vs. ERN Go/NoGo (.36, .67) (0.28, 0.73) (0.44, 0.88) (0.20, 0.66)
Pe Flanker vs. Pe Stroop (.30, .59) (0.22, 0.64) (0.36, 0.82) (0.15, 0.58)
Pe Flanker vs. Pe Go/NoGo (.63, .82) (0.54, 0.89) (0.68, 1.07) (0.46, 0.84)
Pe Stroop vs. Pe Go/NoGo (.43, .69) (0.35, 0.75) (0.49, 0.92) (0.27, 0.69)
Flanker: ERN vs. Pe (-.14, .18)
Stroop: ERN vs. Pe (-.31, .04)
Go/NoGo: ERN vs. Pe (-.08, .25)

The Simple Correlation column is the correlation for the Effect in that row. So, the first value is the correlation between ERN flanker and ERN Stroop.

The remaining columns represent the contrast between the correlation in the Effect column and that particular column. For example, the (.26, .71) in the Flanker: ERN vs. Pe column is the contrast between the correlation for ERN Flanker vs. ERN Stroop and Flanker: ERN vs. Pe. These are the 95% credible intervals of the posterior distributions of the differences and whether they exceed zero (e.g., does the difference in the posterior distributions of two correlations exclude 0?). If they exclude 0, they are bolded.

  1. We expect ERN and Pe recorded during the same task to be more strongly correlated than ERN with N2 or Pe with N2 recorded during the same task.
Effect Simple Correlation ERN vs. N2 Pe vs. N2
Flanker: ERN vs. Pe (-.14, .18) (-0.32, 0.02) (0.17, 0.59)
Flanker: ERN vs. N2 (.54, .75)
Flanker: Pe vs. N2 (-.03, .26)
Stroop: ERN vs. Pe (-.31, .04) (-0.90, -0.46) (-0.21, 0.16)
Stroop: ERN vs. N2 (.41, .67)
Stroop: Pe vs. N2 (-.27, .04)
Go/NoGo: ERN vs. Pe (-.08, .25) (-0.78, -0.38) (-0.13, 0.21)
Go/NoGo: ERN vs. N2 (.54, .78)
Go/NoGo: Pe vs. N2 (-.10, .21)
  1. We expect ERN, N2, and Pe to be more strongly correlated with each other than with the more sensory-based stimulus-locked N1 component recorded during the same task.
Effect ERN vs. N1 Pe vs. N1 N2 vs. N1
Flanker: ERN vs. Pe (-0.34, 0.13) (-0.07, 0.35) (-0.47, -0.04)
Flanker: ERN vs. N2 (0.36, 0.69) (0.59, 0.96) (0.20, 0.55)
Flanker: Pe vs. N2 (-0.23, 0.22) (0.06, 0.43) (-0.37, 0.06)
Stroop: ERN vs. Pe (-0.38, 0.15) (-0.20, 0.29) (-0.65, -0.18)
Stroop: ERN vs. N2 (0.38, 0.76) (0.52, 0.93) (0.06, 0.46)
Stroop: Pe vs. N2 (-0.33, 0.16) (-0.13, 0.27) (-0.61, -0.17)
Go/NoGo: ERN vs. Pe (-0.28, 0.26) (-0.02, 0.48) (-0.55, -0.06)
Go/NoGo: ERN vs. N2 (0.36, 0.77) (0.59, 1.02) (0.06, 0.49)
Go/NoGo: Pe vs. N2 (-0.31, 0.20) (-0.02, 0.40) (-0.59, -0.10)

Aim 2 (Relationships with External Correlates)

ASR Summary Stats

N Mean SD Min Q1 Median Q3 Max
Internalizing Raw 182 15.46 10.57 1 7 13 21 49
Externalizing Raw 182 7.73 5.67 0 4 7 10 31
Attention Problems Raw 182 7.49 4.67 0 4 7 10 24
Thought Problems Raw 182 2.72 2.26 0 1 2 4 13
Internalizing T 182 54.21 10.88 32 46 54 61 82
Externalizing T 182 47.60 8.44 30 43 48 53 70
Attention Problems T 182 56.47 6.82 50 51 56 59 87
Thought Problems T 182 54.98 6.30 50 50 52 58 83

MLM with ASR Scores

Here is the linear model for ERN.

  ERN
Predictors Estimates 95% CI p
Intercept 3.40 -8.69 – 15.50 0.581
Task: Go/NoGo -3.17 -6.00 – -0.34 0.028
Task: Stroop -0.47 -3.30 – 2.36 0.743
Internalizing -0.04 -0.24 – 0.15 0.672
Externalizing -0.03 -0.25 – 0.20 0.817
Attention Problems -0.06 -0.13 – 0.01 0.104
Thought Problems 0.02 -0.06 – 0.09 0.632
Task: Go/NoGo x Internalizing -0.01 -0.07 – 0.04 0.588
Task: Stroop x Internalizing 0.01 -0.04 – 0.06 0.658
Task: Go/NoGo x Externalizing 0.06 -0.00 – 0.13 0.064
Task: Stroop x Externalizing -0.02 -0.08 – 0.05 0.648
Internalizing x Externalizing 0.00 -0.00 – 0.00 0.713
Random Effects
σ2 4.98
τ00 subjid 4.44
ICC 0.47
N subjid 182
Observations 546
Marginal R2 / Conditional R2 0.034 / 0.489

But please note the ANOVA for the model did not yield significant effects so we shouldn’t interpret any lower-order effects.

Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
Task 28.103 14.052 2 364 2.82091 0.0609
Internalizing 0.951 0.951 1 182 0.19082 0.6628
Externalizing 0.048 0.048 1 182 0.00964 0.9219
Attention Problems 13.238 13.238 1 182 2.65753 0.1048
Thought Problems 1.141 1.141 1 182 0.22906 0.6328
Task x Internalizing 4.839 2.419 2 364 0.48569 0.6157
Task x Externalizing 29.929 14.964 2 364 3.00416 0.0508
Internalizing x Externalizing 0.674 0.674 1 182 0.13531 0.7134

Here is the linear model for \(\Delta\)ERN.

  ERN_Difference
Predictors Estimates 95% CI p
Intercept -7.70 -18.39 – 2.99 0.158
Task: Go/NoGo -1.94 -4.89 – 1.01 0.197
Task: Stroop -0.98 -3.93 – 1.97 0.515
Internalizing 0.09 -0.08 – 0.27 0.306
Externalizing 0.09 -0.11 – 0.29 0.368
Attention Problems -0.02 -0.08 – 0.05 0.604
Thought Problems 0.01 -0.06 – 0.07 0.808
Task: Go/NoGo x Internalizing -0.01 -0.06 – 0.05 0.820
Task: Stroop x Internalizing 0.04 -0.02 – 0.09 0.161
Task: Go/NoGo x Externalizing 0.04 -0.03 – 0.11 0.279
Task: Stroop x Externalizing -0.03 -0.10 – 0.04 0.346
Internalizing x Externalizing -0.00 -0.01 – 0.00 0.389
Random Effects
σ2 5.42
τ00 subjid 2.92
ICC 0.35
N subjid 182
Observations 546
Marginal R2 / Conditional R2 0.025 / 0.367

Similarly, the ANOVA for the model did not yield significant effects.

Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
Task 9.047 4.523 2 364 0.8351 0.435
Internalizing 7.331 7.331 1 182 1.3534 0.246
Externalizing 4.746 4.746 1 182 0.8761 0.351
Attention Problems 1.457 1.457 1 182 0.2690 0.605
Thought Problems 0.319 0.319 1 182 0.0589 0.809
Task x Internalizing 16.932 8.466 2 364 1.5629 0.211
Task x Externalizing 22.295 11.148 2 364 2.0580 0.129
Internalizing x Externalizing 4.034 4.034 1 182 0.7447 0.389

In short, the symptoms did not significantly predict ERN or \(\Delta\)ERN.

Exploratory Analyses

Here is the script that was used for the exploratory analyses.

#which_model input defined which model to run from those described below.

which_model <- commandArgs(trailingOnly = TRUE)
which_model <- as.numeric(which_model[1])

library(brms)
library(cmdstanr)

load("~/rrr_ern_alldata.RData")
set_cmdstan_path("~/cmdstanr_cmdstan/cmdstan-2.29.2")
save_path <- "~/rrr_ern_brms"


n_chains <- 4
n_cores <- 4
n_iter <- 2000
n_warmup <- 18000
n_seed <- 042823
n_threads <- 6

pr_ls <- c(
  set_prior("normal(0,3)", class = "b"),
  set_prior("student_t(10, 0, 3)", class = "sd"),
  set_prior("student_t(10, 0, 3)", class = "sigma")
)

erp_onlysngtrl$site <- ifelse(erp_onlysngtrl$subjid < 2000, "usf", "byu")

erp_onlysngtrl <- erp_onlysngtrl[
  erp_onlysngtrl$cell %in% c("flk_err_ern", "flk_err_pe", "gng_err_ern", "gng_err_pe", 
                             "str_err_ern", "str_err_pe",  "flk_inc_n1", "flk_inc_n2", 
                             "gng_ng_n1", "gng_ng_n2", 
                             "str_inc_n1", "str_inc_n2"),
]

split_column <- strsplit(erp_onlysngtrl$cell, "_")
erp_onlysngtrl$task <- sapply(split_column, `[`, 1)
erp_onlysngtrl$comp <- sapply(split_column, `[`, 3)

erp_onlysngtrl$task <- as.factor(erp_onlysngtrl$task)
erp_onlysngtrl$comp <- as.factor(erp_onlysngtrl$comp)
erp_onlysngtrl$subjid <- as.factor(erp_onlysngtrl$subjid)

if (which_model == 1) {
  
  erp_onlysngtrl <- erp_onlysngtrl[erp_onlysngtrl$comp == "ern",]  
  
  brm_fit_ern <- brm(erp ~ 1 + site + 
                       (1|subjid) + 
                       (1|task) + 
                       (1|task:subjid),
                     data = erp_onlysngtrl,
                     family = gaussian(),
                     prior = pr_ls,
                     chains = n_chains,
                     cores = n_cores,
                     iter = n_iter + n_warmup,
                     warmup = n_warmup,
                     seed = n_seed,
                     sample_prior = "yes",
                     backend = "cmdstanr",
                     threads = threading(n_threads),
                     adapt_delta = .99,
                     max_treedepth = 15,
                     file = file.path(save_path,"rrr_ern_mtmm_expl_ern"))
  
  summary(brm_fit_ern)
  
} else if (which_model == 2) {
  
  erp_onlysngtrl <- erp_onlysngtrl[erp_onlysngtrl$comp == "pe",]  
  
  brm_fit_pe <- brm(erp ~ 1 + site + 
                      (1|subjid) + 
                      (1|task) + 
                      (1|task:subjid),
                    data = erp_onlysngtrl,
                    family = gaussian(),
                    prior = pr_ls,
                    chains = n_chains,
                    cores = n_cores,
                    iter = n_iter + n_warmup,
                    warmup = n_warmup,
                    seed = n_seed,
                    sample_prior = "yes",
                    backend = "cmdstanr",
                    threads = threading(n_threads),
                    adapt_delta = .99,
                    max_treedepth = 15,
                    file = file.path(save_path,"rrr_ern_mtmm_expl_pe"))
  
  summary(brm_fit_pe)
  
} else if (which_model == 3) {
  
  erp_onlysngtrl <- erp_onlysngtrl[erp_onlysngtrl$comp == "n2",]  
  
  brm_fit_n2 <- brm(erp ~ 1 + site + 
                      (1|subjid) + 
                      (1|task) + 
                      (1|task:subjid),
                    data = erp_onlysngtrl,
                    family = gaussian(),
                    prior = pr_ls,
                    chains = n_chains,
                    cores = n_cores,
                    iter = n_iter + n_warmup,
                    warmup = n_warmup,
                    seed = n_seed,
                    sample_prior = "yes",
                    backend = "cmdstanr",
                    threads = threading(n_threads),
                    adapt_delta = .99,
                    max_treedepth = 15,
                    file = file.path(save_path,"rrr_ern_mtmm_expl_n2"))
  
  summary(brm_fit_n2)
  
} else if (which_model == 4) {
  
  erp_onlysngtrl <- erp_onlysngtrl[erp_onlysngtrl$comp == "n1",]  
  
  brm_fit_n1 <- brm(erp ~ 1 + site + 
                      (1|subjid) + 
                      (1|task) + 
                      (1|task:subjid),
                    data = erp_onlysngtrl,
                    family = gaussian(),
                    prior = pr_ls,
                    chains = n_chains,
                    cores = n_cores,
                    iter = n_iter + n_warmup,
                    warmup = n_warmup,
                    seed = n_seed,
                    sample_prior = "yes",
                    backend = "cmdstanr",
                    threads = threading(n_threads),
                    adapt_delta = .99,
                    max_treedepth = 15,
                    file = file.path(save_path,"rrr_ern_mtmm_expl_n1"))
  
  summary(brm_fit_n1)
  
}

ERN

Group ICC
subjid 0.0531850
task 0.0152521
task:subjid 0.0337091

Pe

Group ICC
subjid 0.0847282
task 0.0589856
task:subjid 0.0473605

N2

Group ICC
subjid 0.0605298
task 0.0246928
task:subjid 0.0353104

N1

Group ICC
subjid 0.0293998
task 0.0049109
task:subjid 0.0121961

loaded libraries with versions

sessionInfo()
## R version 4.1.2 (2021-11-01)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] performance_0.10.2   papeR_1.0-5          xtable_1.8-4        
##  [4] car_3.1-1            carData_3.0-5        patchwork_1.1.2     
##  [7] sjlabelled_1.2.0     sjmisc_2.8.9         sjPlot_2.8.12       
## [10] lmerTest_3.1-3       lme4_1.1-32          Matrix_1.5-3        
## [13] ez_4.4-0             brms_2.19.0          Rcpp_1.0.10         
## [16] lubridate_1.9.1      forcats_0.5.2        stringr_1.5.0       
## [19] dplyr_1.1.1          purrr_1.0.1          readr_2.1.3         
## [22] tidyr_1.3.0          tibble_3.2.1         ggplot2_3.4.2       
## [25] tidyverse_1.3.2.9000 here_1.0.1          
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.3           tidyselect_1.2.0     htmlwidgets_1.6.2   
##   [4] grid_4.1.2           munsell_0.5.0        effectsize_0.8.2    
##   [7] codetools_0.2-18     DT_0.27              miniUI_0.1.1.1      
##  [10] withr_2.5.0          Brobdingnag_1.2-9    colorspace_2.1-0    
##  [13] highr_0.10           knitr_1.42           rstudioapi_0.14     
##  [16] stats4_4.1.2         bayesplot_1.10.0     emmeans_1.8.5       
##  [19] rstan_2.21.8         farver_2.1.1         datawizard_0.7.0    
##  [22] bridgesampling_1.1-2 rprojroot_2.0.3      coda_0.19-4         
##  [25] vctrs_0.6.2          generics_0.1.3       TH.data_1.1-1       
##  [28] xfun_0.37            timechange_0.2.0     R6_2.5.1            
##  [31] markdown_1.5         gamm4_0.2-6          projpred_2.3.0      
##  [34] cachem_1.0.7         promises_1.2.0.1     scales_1.2.1        
##  [37] multcomp_1.4-23      nnet_7.3-18          gtable_0.3.3        
##  [40] processx_3.8.1       sandwich_3.0-2       rlang_1.1.1         
##  [43] systemfonts_1.0.4    splines_4.1.2        broom_1.0.4         
##  [46] rapportools_1.1      checkmate_2.2.0      inline_0.3.19       
##  [49] yaml_2.3.7           reshape2_1.4.4       abind_1.4-5         
##  [52] modelr_0.1.10        threejs_0.3.3        crosstalk_1.2.0     
##  [55] backports_1.4.1      httpuv_1.6.9         Hmisc_5.0-1         
##  [58] tensorA_0.36.2       tools_4.1.2          tcltk_4.1.2         
##  [61] ellipsis_0.3.2       kableExtra_1.3.4     multilevel_2.7      
##  [64] jquerylib_0.1.4      posterior_1.4.1      plyr_1.8.8          
##  [67] base64enc_0.1-3      ps_1.7.5             prettyunits_1.1.1   
##  [70] rpart_4.1.19         summarytools_1.0.1   zoo_1.8-11          
##  [73] cluster_2.1.4        magrittr_2.0.3       data.table_1.14.8   
##  [76] magick_2.7.4         gmodels_2.18.1.1     colourpicker_1.2.0  
##  [79] mvtnorm_1.1-3        matrixStats_0.63.0   hms_1.1.2           
##  [82] shinyjs_2.1.0        mime_0.12            evaluate_0.20       
##  [85] shinystan_2.6.0      sjstats_0.18.2       gridExtra_2.3       
##  [88] ggeffects_1.2.0      rstantools_2.3.0     compiler_4.1.2      
##  [91] psychometric_2.3     psychReport_3.0.2    crayon_1.5.2        
##  [94] minqa_1.2.5          StanHeaders_2.21.0-7 htmltools_0.5.5     
##  [97] mgcv_1.8-41          later_1.3.0          tzdb_0.3.0          
## [100] Formula_1.2-5        RcppParallel_5.1.7   DBI_1.1.3           
## [103] MASS_7.3-58.2        boot_1.3-28.1        cli_3.6.1           
## [106] pryr_0.1.6           gdata_2.18.0.1       parallel_4.1.2      
## [109] insight_0.19.1       igraph_1.4.1         pkgconfig_2.0.3     
## [112] numDeriv_2016.8-1.1  foreign_0.8-84       xml2_1.3.3          
## [115] dygraphs_1.1.1.6     svglite_2.1.1        bslib_0.4.2         
## [118] webshot_0.5.4        estimability_1.4.1   rvest_1.0.3         
## [121] distributional_0.3.2 callr_3.7.3          digest_0.6.31       
## [124] parameters_0.20.1    rmarkdown_2.20       htmlTable_2.4.1     
## [127] shiny_1.7.4          gtools_3.9.4         nloptr_2.0.3        
## [130] lifecycle_1.0.3      nlme_3.1-161         jsonlite_1.8.4      
## [133] cmdstanr_0.5.3       viridisLite_0.4.2    fansi_1.0.4         
## [136] pillar_1.9.0         lattice_0.20-45      loo_2.5.1           
## [139] fastmap_1.1.1        httr_1.4.4           pkgbuild_1.4.0      
## [142] survival_3.5-0       glue_1.6.2           xts_0.13.0          
## [145] bayestestR_0.13.0    shinythemes_1.2.0    pander_0.6.5        
## [148] stringi_1.7.12       sass_0.4.5